package com.baizhi.service;

import com.baizhi.dao.EmsDao;
import com.baizhi.entity.Ems;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional
public class EmsServiceImpl implements EmsService {

    @Resource
    private EmsDao emsDao;

    @Override
    public List<Ems> FindAllEms() {
       return emsDao.FindAllEms();
    }

    @Override
    public void addEms(Ems ems) {
       emsDao.addEms(ems);
    }

    @Override
    public void deleteEms(Integer id) {
        emsDao.deleteEms(id);
    }

    @Override
    public void updateEms(Ems ems) {
        emsDao.updateEms(ems);
    }

    @Override
    public Ems queryByIdEms(Integer id) {
        Ems ems = emsDao.queryByIdEms(id);
        return ems;
    }
}
